package gof_002_结构型_Structural.gof_001_代理_Proxy.gof_001_StaticProxy;

/**
 * 歌手经纪人
 */
public class Agent implements Singer{
    private Singer singer;
    //注入歌手
    public Agent(Singer singer) {
        this.singer = singer;
    }

    @Override
    public void connection() {
        System.out.println("经纪人在联系...");
    }

    @Override
    public void bargain() {
        System.out.println("经纪人在讨价还价...");
    }

    @Override
    public void payEarnestMoney() {
        System.out.println("经纪人在支付订金...");
    }

    @Override
    public void sing() {
        singer.sing();						//【注意这里:其他步骤都是经纪人在干活,只有唱歌的时候是调用歌手具体唱歌】
    }

    @Override
    public void payBalanceDue() {
        System.out.println("经纪人在支付尾款...");
    }
}